package com.gold.goldproviderdemo;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@SpringBootApplication
@EnableEurekaClient
@RestController
public class GoldProviderDemoApplication {
	/**
	 * 访问地址：http://localhost:9001/gold-provider-demo/hello?name=wang
	 * @param args
	 */
	public static void main(String[] args) {
		SpringApplication.run(GoldProviderDemoApplication.class, args);
	}

	@Value("${server.port}")
	String port;

	@RequestMapping("/hello")
	public String hello(@RequestParam  String name){
		return "hello "+name+",the port is "+port;
	}
}
